package com.itheima.repository;

import com.itheima.domain.PersonRedis;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface PersonRepository extends CrudRepository<
        PersonRedis, String> {
    List<PersonRedis> findByLastname(String lastname);
    Page<PersonRedis> findPersonByLastname(String lastname, Pageable page);
    List<PersonRedis> findByFirstnameAndLastname(String firstname, String lastname);
    List<PersonRedis> findByAddress_City(String city);
    List<PersonRedis> findByFamilyList_Username(String username);
}
